/*
* @(#)Utility.java
*
* Copyright (c) 2003 DCIVision Ltd
* All rights reserved.
*
* This software is the confidential and proprietary information of DCIVision
* Ltd ("Confidential Information").  You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the license
* agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.framework;

import javax.servlet.jsp.PageContext;

/**
  Debugger.java

  Debug utility

    @author          Ryan Kwan
    @company         ParaDM Co. Ltd
    @creation date   10/03/2007
    @version         $Revision: 1.3 $
*/
public class Debugger {

  public static final String REVISION = "$Revision: 1.3 $";
  
  /**
   * Master key to hold the debug data in HttpSession
   */
  public static final String DEBUG="DEBUG";
  
  /**
   * Key to indicate showing message label key into screen during debug
   */  
  public static final String SHOW_LABEL_KEY="SHOW_LABEL_KEY";  

  private Debugger() {
  }
  
  public static boolean isShowLabelKey(PageContext pageContext){
    if(pageContext.getSession().getAttribute(DEBUG)!=null 
     && ((java.util.Map)pageContext.getSession().getAttribute(DEBUG)).get(SHOW_LABEL_KEY)!=null)
    {
      return true;
    }else{
      return false;	
    }
  }
}